<?php require("../../inc/common.inc.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="../images/style.css" rel="stylesheet" type="text/css" />
</head>

<body style="background:#FFF;">
<?php
if($type=="msg"){
	$msginfo = $db->getinfo("select * from mx_sucai_msg where mid='$id' limit 1");
	if(!$msginfo){
		echo '<div class="showrow"><h1 class="showtitle">没有找到您要的内容</h1></div>';
	}else{
		$picinfo = $db->getinfo("select * from mx_sucai_file where fid='".$msginfo["mpic"]."' limit 1");
		if($show=="yes"){
//全文
?>
<div class="showrow">
<h1 class="showtitle"><?php echo $msginfo["mtitle"];?></h1>
<div class="showbimg"><img src="<?php echo $picinfo["fpath"];?>" width="170"/></div>
<div class="showcon2"><?php echo $msginfo["mcontent"];?></div>
</div>
<?php
		}elseif($msginfo["mtype"]==0){
//单图文
?>
<div class="showrow">
<h1 class="showtitle"><a href="get_mobileshow.php?id=<?php echo $id;?>&type=<?php echo $type;?>&show=yes"><?php echo $msginfo["mtitle"];?></a></h1>
<div class="showbimg"><img src="<?php echo $picinfo["fpath"];?>" width="170"/></div>
<p class="showcon"><?php echo $msginfo["mabstract"];?></p>
<span class="showmore"><a href="get_mobileshow.php?id=<?php echo $id;?>&type=<?php echo $type;?>&show=yes">查看原文</a></span>
</div>
<?php
		}else{
//多图文
		$smsg = array();
		$smsgquery = $db->excu("select * from mx_sucai_msg where fid=".$id." order by addtime,mid");
		while($smsgarr = $db->fetch_array($smsgquery)){
			$smsg[] = $smsgarr;
		}
?>
<div class="showrow">
<h1 class="showtitle"><a href="get_mobileshow.php?id=<?php echo $id;?>&type=<?php echo $type;?>&show=yes"><?php echo $msginfo["mtitle"];?></a></h1>
<div class="showbimg"><img src="<?php echo $picinfo["fpath"];?>" width="170"/></div>
<?php
//子图文
if(count($smsg)>0){
	foreach($smsg as $key=>$value){
		//获得封面图片
	$mpic = $db->getinfo("select fpath from mx_sucai_file where fid = ".$value["mpic"]." limit 1");
?>
<div class="showsonmsg">
<div class="showsonmsgimg"><img src="<?php echo $mpic["fpath"];?>" width="60" height="60"/></div>
<h1><a href="get_mobileshow.php?id=<?php echo $value["mid"];?>&type=<?php echo $type;?>&show=yes"><?php echo $value["mtitle"];?></a></h1>
<div class="clear"></div>
</div>
<?php
	}
}
?>
</div>
<?php	
		}
?>
<?php
	}
}elseif($type=="pic"){
	$msginfo = $db->getinfo("select * from mx_sucai_file where fid='$id' limit 1");
	if(!$msginfo){
		echo $id.'<div class="showrow"><h1 class="showtitle">没有找到您要的内容</h1></div>';
	}else{
?>

<div class="showrow">

<div class="showbimg"><img src="<?php echo $msginfo["fpath"];?>" width="170"/></div>
<h1 class="showtitle"><?php echo $msginfo["fname"];?></h1>
</div>
<?php
	}
}elseif($type=="music"){
	$msginfo = $db->getinfo("select * from mx_sucai_file where fid='$id' limit 1");
	if(!$msginfo){
		echo $id.'<div class="showrow"><h1 class="showtitle">没有找到您要的内容</h1></div>';
	}else{
?>
<div class="showrow">
<div class="showbimg">
<embed src="/audioplayer.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="170" height="24" FlashVars="playerID=7643&soundFile=<?php echo $msginfo["fpath"];?>" wmode="transparent"></embed>
</div>
<h1 class="showtitle"><?php echo $msginfo["fname"];?></h1>
</div>
<?php
	}
}elseif($type=="video"){
	$msginfo = $db->getinfo("select * from mx_sucai_file where fid='$id' limit 1");
	if(!$msginfo){
		echo $id.'<div class="showrow"><h1 class="showtitle">没有找到您要的内容</h1></div>';
	}else{
?>
<div class="showrow">
<div class="showbimg">
<?php echo get_video($msginfo["fpath"],$width="",$height="")?>
</div>
<h1 class="showtitle"><?php echo $msginfo["fname"];?></h1>
</div>
<?php
	}
}
?>
</body>
</html>